export const block: ICustomBlockOption = {
    name: "SToyWaterRipples",
    comments: "实现ShaderToy水面涟漪效果",
    document: "https://www.shadertoy.com/view/4ddyDn",
    target: "Fragment",
    inParameters: [
        {
            name: "uv",
            type: "Vector2"
        },
        {
            name: "time",
            type: "Float"
        }
    ],
    outParameters: [
        {
            name: "output",
            type: "Vector2"
        }
    ],
    "includes": [
        "shaderToyDeclaration"
    ],
    entryFunctionName: "SToyWaterRipples",
    code: `
        void SToyWaterRipples({TYPE_uv} fragCoord, {TYPE_time} t, out {TYPE_output} result) {
            float uvMult = 2.;
            vec2 uv1 = fragCoord/iResolution.xy;
            uv1*=uvMult;
            float len = length(uv1 - vec2(.5 * uvMult)) * 50.;
            vec2 s = normalize(uv1) * ( sin((len - t * 10.))) * .01;
            result = uv1 + s;
        }
    `
}